<!DOCTYPE html>
<html>
  
  <head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
 <link rel="stylesheet" href="../static/css/back/font.css">
    <link rel="stylesheet" href="../static/css/back/xadmin.css">
    <script type="text/javascript" src="../static/js/jquery-2.1.1.min.js"></script>
<!--      -->
    <script type="text/javascript" src="../static/js/back/xadmin.js"></script>
    <script type="text/javascript" src="../static/js/back/goods-list.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
<style type="text/css">
.left-type {
	width: 100px;
	border: 1px #e6e6e6 solid;
	text-align: center;
	line-height: 30px;
	float: left;
	background-color: rgba(242, 242, 242, 0.26);
}

.right-table {
	
}

.left-type xblock {
	height: 30px !important;
	line-height: 30px !important;
}

.left-type ul li {
	padding: 5px 0;
	border-bottom: 1px #f2f2f2 solid;
	cursor: pointer;
}

.left-type ul li:hover {
	background-color: #f2f2f2;
	border-left: 3px #009688 solid;
}

.lt-li-active {
	background-color: #f2f2f2;
	border-left: 3px #009688 solid;
}

.left-type ul {
	margin-top: -10px;
}

.addmendian {
	float: right;
}
.shop-sup{
   		display: block;
	    text-align: center;
	    border: 1px solid;
	    border-radius: 5px;
	    margin: 5px 0;
   	}
   	.mei {
	color: #f50;
}

.tang {
	color: green;
}
</style>
  </head>
  
  <body>
    <div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="javascript:;">首页</a>
        <a href="javascript:;">系统管理</a>
        <a href="javascript:;"><cite>管理员设置</cite></a>
      </span>
      <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="iconfont icon-refresh right-top-ref" ></i></a>
    </div>
    <div class="x-body">
      <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so"  onsubmit="javascript:return false;">
<!--           <input class="layui-input" placeholder="开始日" name="start" id="start"> -->
<!--           <input class="layui-input" placeholder="截止日" name="end" id="end"> -->
          <input type="text" id="goodsTitle"  placeholder="请输入商品名称" autocomplete="off" class="layui-input">
			      <div class="layui-input-inline">
			        <select class="status" name="status" id="status" lay-verify="" lay-search="">
			          <option value="">全部</option>
			          <option value="1">售卖中</option>
			          <option value="2">已下架</option>
			          <option value="3">已售罄</option>
			        </select>
			      </div>
         <button class="layui-btn search-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i>查询</button>
         <button class="layui-btn addmendian layui-btn-primary"  onclick="downloadCityExcel()"><i class="layui-icon"></i> 下载模板</button>
         <button class="layui-btn addmendian layui-btn-primary" id="uploadgoods"  ><i class="layui-icon"></i> 批量导入</button>
         <button class="layui-btn addmendian "  onclick="x_admin_show('添加菜品信息','./goods-add.html?type=add','','','true')"><i class="layui-icon"></i> 添加商品</button>
<!--          <button class="layui-btn addmendian" onclick="x_admin_show('添加管理员','./goods-add.html?type=add',551,580)"><i class="layui-icon"></i>添加商品</button> -->
        </form>
      </div>
      <xblock>
<!--         <button class="layui-btn layui-btn-danger" onclick="delAll()"><i class="layui-icon"></i>批量删除</button> -->
        <button class="layui-btn" onclick="member_udall()">批量上架</button>
        <button class="layui-btn" onclick="member_udall2()">批量下架</button>
        <button class="layui-btn layui-btn-danger" onclick="delAll()">批量删除</button>
<!--         <button class="layui-btn" onclick="x_admin_show('添加管理员','./banner-add.html?type=add',551,580)"><i class="layui-icon"></i>添加</button> -->
        <span class="x-right" style="line-height:40px">共有数据：88 条</span>
      </xblock>
      
      <form class="layui-form layui-col-md12 x-so">
      		<div class="layui-form-item">
<!-- 			      <label class="layui-form-label"><span class="x-red">*</span>权限组</label> -->
				  <div class="left-type">
				     <xblock>
				    	 商品分类
				     </xblock>
				     <ul>
				     </ul>
				  </div>
			      <div class="layui-input-block">
				      <table class="layui-table">
				        <thead>
				          <tr>
				            <th>
				              <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
				            </th>
				            <th>排序</th>
				            <th>菜品名称</th>
				            <th>菜品图片</th>
				            <th>支持</th>
				            <th>外卖价格</th>
				            <th>堂食价格</th>
				            <th>库存</th>
				            <th>状态</th>
				            <th>操作</th>
				        </thead>
				        <tbody>
				        </tbody>
				      </table>
				      <div class="layui-form-mid layui-word-aux no-more-data hide">暂无更多数据</div>
				      <div class="page mypage" ></div> 
		      	</div>
		  	 </div>
          </form>
      </div>
    <script>
      layui.use(['laydate','upload'], function(){
        var laydate = layui.laydate,$ = layui.jquery,
        upload = layui.upload;
        
        //执行一个laydate实例
        laydate.render({
          elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
          elem: '#end' //指定元素
        });
        
        var pid = getCookie("shop_id");
        uploadListIns  =  upload.render({
            elem: '#uploadgoods'
            ,url: '../excel/importGoods/'
            ,accept: 'file' //普通文件
            ,auto: true
            ,exts: 'xls|xlsx' 
            ,multiple: false
            ,data:{shopId:pid}
	        ,before: function(obj){
	        	layer.load();
	        }
            ,done: function(res){
              console.log(res)
              if(res.resultCode == 1000){
	              layer.msg('导入成功',{icon:6,time:2000});
	              layer.closeAll('loading');
	              return;
              }else if(res.resultCode == 9999 ){
	              layer.alert(res.returnObject);
	              layer.closeAll('loading');
	              return;
              }
            }
          });
        
        
      });
    </script>

  </body>

</html>